$ () ->
	$("#update_btn").click (e) ->
		param = 
			id:$("#order_id").val()
			status:$("#status").val()
		$.post "/api/admin/order/update-status",param,(res) ->
			if res.status.errCode is 0
				alert "修改成功"
				window.location.href = '/admin/order/index'
			else
				alert res.status.message

	$("#cancel_btn").click (e) ->
		window.location.href = "/admin/order/index"